package com.example;

import javax.microedition.khronos.opengles.GL10;

import com.step.Step;
import com.step.Step.Dimension;
import com.step.graphic.Texture;
import com.step.graphic.TextureRegion;
import com.step.sprite.AnimatedSprite2D;

public class AnimatedSprite2DExample extends BaseExample{
	AnimatedSprite2D sprite2d;

	@Override
	public void create() {
		Step.dimension = Dimension.d2d;
		sprite2d = new AnimatedSprite2D(TextureRegion.splitToRegions(new Texture("animation/walk.png"), 64, 64));
		sprite2d.getAnimation().play();
	}

	@Override
	public void update() {
		GL10 gl = Step.gl;
		gl.glClearColor(1, 1, 1, 1);
		sprite2d.draw(gl);
	}	
}
